<template>
  <div class="iframe">
    <div class="i-title">
      <h3>setup 函数包含钩子函数</h3>
    </div>
    <div class="i-tip">
      {{ tip }}
    </div>
  </div>
</template>

<script>
import { onMounted } from "vue";
export default {
  name: "hello",
  setup() {
    console.log("setup");
    let tip = "setup > beforeCreate > onMounted";
    onMounted(() => {
      console.log("onMounted");
    });
    return { tip };
  },
  beforeCreate() {
    console.log("beforeCreate");
  },
};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
ul {
  list-style-type: none;
  padding: 0;
}
li {
  display: inline-block;
  margin: 0 10px;
}
a {
  color: #42b983;
}
</style>
